Login Windows Authentication
- The login function, like initialize, authenticates the user and stores the result into the embed cookie.
- The function has no arguments - as the appropriate token is read in from the browser context running on the user's Windows desktop.
- The function returns the authentication token string.
Using Windows Authentication
The assumption is that the hosting app is running in a browser that supports Windows Authentication; that Pyramid is using Active Directory as the Authentication provider; and that Windows Authentication has been chosen as the authentication method in Pyramid. Obviously, the application can only be launched from within a Windows desktop.
Example
The following initializes a new embed client for the target instance of Pyramid and authenticates a new user using the Windows Kerberos token. This is using the "promise" syntactical structure.
var client = new PyramidEmbedClient("https://analytics.pyramid.com"); client. loginWindowsAuth().then(token=>{ client.init(); });